var activePage = "logs";

var timeoutHandler = function() {
    var d = arguments.callee;
    $('#logs-loader').show();
    $.getJSON("refresh", { logId : lastLogId+1 }, function(data) {
        $('#logs-loader').hide();
        if(data.lastLogId > 0) {
            lastLogId = data.lastLogId;
            $('#logs-table tbody').append(data.content);
            $('#logs-number').html($('#logs-table tbody').children().size());
        }
        setTimeout("timeoutHandler()", 3000);
    });
}

setTimeout("timeoutHandler()", 3000);
